
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/bootstrap-5.1.3-dist/css/bootstrap.css">
    <script type="text/javascript" src="/static/bootstrap-5.1.3-dist/js/bootstrap.js"></script>
    <title>我的粉丝</title>
</head>

<style>
    .card {
        width: 1600px;
        height: 650px;
        background-color: #fffdfd;
        margin-left: 50px;
        margin-top: 40px;
        border-radius: 30px;
        border: none;
        box-shadow: 5px 5px 10px #adabab;
    }


    table {
        text-align: center;
        vertical-align: middle !important;
        word-wrap:break-all;
        word-break:break-all;
        table-layout:fixed;

        width: 90% !important;
        margin-left: 80px;

        margin-top: 50px;

    }

    .page {
        height: 50px;
        /*width: 1270px;*/
        /*margin-left: 1400px;*/
        position: fixed;
        bottom: 180px;
        right: 150px;
    }

</style>
<body>
<jsp:include page="static/Page/common/Navbar.jsp"/>

<div class="card">
    <table id="test" class="table table-bordered table-striped">
        <colgroup>
            <col width="100">
            <col width="150">
            <col width="200">
            <col width="200">
            <col width="150">
        </colgroup>
        <thead>
        <tr>
            <th>用户头像</th>
            <th>用户名称</th>
            <th>电话</th>
            <th>用户简介</th>
            <th>粉丝数量</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${userList}" var="user" varStatus="s">
            <c:forEach items="${fansList}" var="fans" varStatus="s1">
                <c:if test="${user.id==fans.userid}">
                    <tr>
                        <td>
                            <img src="${pageContext.request.contextPath}/display?photo=${user.photo}" style="width: 100px;height: 100px">
                        </td>
                        <td><a href="ones_post_list?userid=${user.id}" class="btn-outline-secondary">${user.username}</a></td>
                        <td>${user.phone}</td>
                        <td>${user.userprofile}</td>
                        <td><span>粉丝数: ${fans.fans}</span></td>
                    </tr>
                </c:if>
            </c:forEach>
        </c:forEach>
        </tbody>
    </table>

    <div class="page">
        <nav aria-label="Page navigation example">
            <ul class="pagination justify-content-between">
                <c:if test="${pageInfo.isLast && falg == null}">
                    <li><a href="my_fans?page=${pageInfo.pageIndex-1}" class="page-link"><span
                            aria-hidden="true">&larr;</span> 上一页</a></li>
                </c:if>
                <c:if test="${pageInfo.isNext && falg == null}">
                    <li><a href="my_fans?page=${pageInfo.pageIndex+1}" class="page-link">下一页 <span
                            aria-hidden="true">&rarr;</span></a></li>
                </c:if>

            </ul>
            <span>第 ${pageInfo.pageIndex} 页/共 ${pageInfo.sumCount} 页</span>
        </nav>
    </div>

</div>

<jsp:include page="static/Page/common/Foot.jsp"/>
</body>
</html>